RANGE
The RANGE
field specifier (case sensitive) allows you to find documents in which a specified field contains a date that falls in the inclusive range of two dates specified by you.
NOTE: You can optimize the field specifier speed by restricting the field to the
Format
FieldText=RANGE{yourDates}:yourFields
yourDates
|
Type two dates, separated by a comma (there must be no space before or after the comma). A document returns only if one of By default, the range is inclusive. You can use the greater than (<) and less than (>) symbols to specify an exclusive range. You can make either or both ends of the range exclusive. |
yourFields
|
Type one or more fields. A document returns only if it contains one of these fields, and if this field contains a date that falls within the inclusive range of yourDates . Separate multiple fields with colons (: ). There must be no space before or after a colon. |
You can use the following formats to specify your dates:
Format | Explanation |
---|---|
D+/M+/#YY+
|
A date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DD
|
A date in ISO-8601 format. For example, 2017-05-12 |
HH:NN:SS D+/M+/#YY+
|
A time and date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DDTHH:NN:SSZ
YYYY-MM-DDTHH:NN:SS±HHMM
|
A date and time in ISO-8601 formats, with a time zone (either as a literal Z, or a four digit time zone offset). For example, |
HH:NN:SS D+/M+/#YY+ #ADBC
|
A time and date with a time period. For example, For the time period, you can use IDOL Server treats the date as a date in its local timezone. |
N
|
A positive or negative number of days from the current date. For example, |
Ns
|
A positive or negative number of seconds from now. For example, |
Ne
|
Epoch seconds (seconds since 1 January 1970 UTC). For example, |
NOTE: IDOL Server treats any date that does not have explicit timezone information as a date in the local timezone, both in the index and in your query parameters. This behavior might result in non-intuitive matches.
For example, epoch second values are always UTC. The value 1012345000e
matches times as 22:56:40 on 29 January 2002 UTC. If your local timezone is GMT-6, this query might match an indexed date value of 03:56:40 on 29 January 2002 (which corresponds to the same time UTC), because the indexed date is in your local timezone.
Similarly, if your query date is 03:56:40 29/01/2002
, this might match an indexed epoch seconds date of 1012345000
.
You can specify an open-ended range by using a period (.
):
-
If you type a period for the first point in time, the beginning of the time period is not restricted (so the period ranges up to the specified date, including any date before the specified date).
-
If you type a period for the second point in time, the end of the time period is not restricted (so the period ranges from the specified date, including any date after the specified date).
Example
FieldText=RANGE{01/01/90,1/1/01}:DATE
A document's DATE
field must contain a date between 01/01/1990 and 1/1/2001 for this document to be returned.
FieldText=RANGE{01/01/02,01/01/2003}:DATE:DATUM
A document's DATE
or DATUM
field must contain a date between 01/01/2002 and 01/01/2003 for this document to be returned.
FieldText=RANGE{-14,-7}:DATE
A document's DATE
field must contain a date 14 to 7 days before the current date for this document to be returned.
FieldText=RANGE{0,1}:DATE
A document's DATE
field must contain today's or tomorrow's date (which is possible, for example, if the document originates from a different time zone or if the field contains an expiry date) for this document to be returned.
FieldText=RANGE{01/01/99,.}:DATE:FECHA
A document's DATE
or FECHA
field can contain any date after 01/01/1999 for this document to be returned.
FieldText=RANGE{.,10/10/04}:DATE
A document's DATE
field can contain any date before 10/10/2004 for this document to be returned.
FieldText=RANGE{-172800s,-1}:DATE
A document's DATE
field must contain a time between 48 and 24 hours ago.
FieldText=RANGE{198765e,.}:DATE
A document's DATE
field must contain a date between 198765 seconds after the epoch and the current time.
FieldText=RANGE{>05/06/2013,05/06/2014}:DATE
A document's DATE
field must contain a date after 05/06/2013, up to and including 05/06/2014.